//
//  Public.h
//  aoyouHH
//
//  Created by jinzelu on 15/4/21.
//  Copyright (c) 2015年 jinzelu. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "UIDevice+IdentifierAddition.h"
#import "NSString+MD5Addition.h"
#import "UIImageView+WebCache.h"
#import "UIButton+WebCache.h"
#import "Utils.h"
#import "AFNetworking.h"
#import <AdSupport/AdSupport.h>
#import <CommonCrypto/CommonDigest.h>
//#import <UMSocialCore/UMSocialCore.h>
#import "MJRefresh.h"
#import "MJProgressHUD.h"
#import "MJRequestServer.h"
#import "MJLocaStorage.h"
#import "MJExtension.h"

#import "MJMainModel.h"

//plist本地缓存文件名
//用户基本信息
#define userMessage @"usermessage"
#define default_image @"mine_default_head"
#define default_goods @"default_goods"


#ifndef aoyouHH_Public_h
#define aoyouHH_Public_h

//随机色
#define ZMJRandomColor [UIColor colorWithRed:arc4random_uniform(211)/255.0 green:arc4random_uniform(211)/255.0 blue:arc4random_uniform(211)/255.0 alpha:0.4]

#define ZMJImage(imageName) [UIImage imageNamed:(imageName)]

#define IsNilString(__String) (__String==nil || [__String isEqualToString:@""]|| [__String isEqualToString:@"null"] || [__String isEqualToString:@"(null)"] || [__String isEqualToString:@"<null>"] || [__String isEqual:@""])
#define MFont(font)   [UIFont systemFontOfSize:(font)]
#define loadingTime 1.5
#define IsNull(__Text) [__Text isKindOfClass:[NSNull class]]
#define IsEquallString(_Str1,_Str2)  [_Str1 isEqualToString:_Str2]


//button
# define BtnNormal            UIControlStateNormal
# define BtnTouchUpInside     UIControlEventTouchUpInside

// 取系统版本，e.g.  4.0 5.0
#define kSystemVersion [[[UIDevice currentDevice] systemVersion]  floatValue]
#define IOS7 kSystemVersion>7.0
#define MyAppDelegate (AppDelegate *)[[UIApplication sharedApplication] delegate]


//16进制color 使用方法：HEXCOLOR(0xffffff)
#define HEXCOLOR(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]



// 3.是否为4inch
#define Iphone5 ([UIScreen mainScreen].bounds.size.height == 568)
#define Iphone4 ([UIScreen mainScreen].bounds.size.height == 480)


//resource path
#define __kWidth [[UIScreen mainScreen]bounds].size.width
#define __kHeight [[UIScreen mainScreen]bounds].size.height
#define CGRectOrigin(v)    v.frame.origin
#define CGRectSize(v)      v.frame.size
#define CGRectX(v)         CGRectOrigin(v).x
#define CGRectY(v)         CGRectOrigin(v).y
#define CGRectW(v)         CGRectSize(v).width
#define CGRectH(v)         CGRectSize(v).height


#ifdef DEBUG        //调试状态打开LOG功能
#define NSLog(...) NSLog(__VA_ARGS__)
#else               //发布状态关闭LOG功能
#define NSLog(...)
#endif



//6.经纬度
#define LATITUDE_DEFAULT 39.983497
#define LONGITUDE_DEFAULT 116.318042



#define RootURL @"http://60.205.148.68:8088"



#endif
